import nltk
import ssl

#下面的try。。。except。。else是为了解决在nltk下载过程中出现ssl错误
try:
    _create_unverified_https_context = ssl._create_unverified_context
except AttributeError:
    pass
else:
    ssl._create_default_https_context = _create_unverified_https_context

nltk.download()